
import { createRoot } from 'react-dom/client'
import { StrictMode } from 'react'
import './index.scss'
import App from './App.jsx'
import utils from './utils/utils';
function $(el) {
    if (!el) {
        return undefined;
    }
    return document.querySelector(el)
}
const body = $('body');
function resize() {
    utils.DEVICE.get_screen_size((ev) => {
        body.style.width = ev.width + "px";
        body.style.height = ev.height + "px";
    });
}

window.addEventListener("DOMContentLoaded", function () {
    resize();
    createRoot($("#root")).render(
        <StrictMode>
            <App />
        </StrictMode>
    )
    body.removeChild($(".load-mask"));
});
window.addEventListener("resize", resize)


